//
//  AssistantInfoViewController.m
//  CPetro
//
//  Created by ggx on 2017/3/8.
//  Copyright © 2017年 高广校. All rights reserved.
//

#import "AssistantInfoViewController.h"

#import "LRMoreInputView.h"//

#import "BSButtonView.h"

#import "EntityAssistant.h"
@interface AssistantInfoViewController ()<BSButtonViewDelegate>

@end

@implementation AssistantInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationItemTitle = @"店员姓名";
    
    LRMoreInputView *lrMoreInputView = [[LRMoreInputView alloc]initItemWithFram:CGRectMake(0, 10, SCREEN_WIDTH, 120)
                                                                        andData:@[
  @{@"assistantName":@"店员姓名",@"assistantAccount":self.entityAssistant.assistantName},
  @{@"assistantName":@"店员账号",@"assistantAccount":self.entityAssistant.assistantAccount},
  @{@"assistantName":@"登录密码"}]];
    [self.view addSubview:lrMoreInputView];
    
    BSButtonView *bsButtonView = [[BSButtonView alloc]initItemWithFram:CGRectMake(0, self.view.bounds.size.height - 50, SCREEN_WIDTH, 40) andData:@[@"修改",@"禁止/启用"]];
    bsButtonView.delegate = self;
    [self.view addSubview:bsButtonView];
}
#pragma mark -BsBytton delegate
-(void)didActionBottomIndex:(NSInteger)index{
    for (UIView *subView in self.view.subviews) {
        if ([subView isKindOfClass:[LRMoreInputView class]]) {
            LRMoreInputView *moreView = (LRMoreInputView *)subView;
            for (UIView *subViewSecond in moreView.subviews) {
                if ([subViewSecond isKindOfClass:[LRInputView class]]) {
                    LRInputView *lrInputView = (LRInputView *)subViewSecond;
                    if (lrInputView.tag == 0) {
                        NSLog(@"填入的参数 0==%@--提示文字 == %@",lrInputView.inputText.text,lrInputView.tipName.text);//
                    }else if (lrInputView.tag == 1){
                        NSLog(@"填入的参数 1==%@--提示文字 == %@",lrInputView.inputText.text,lrInputView.tipName.text);//
                    }else if (lrInputView.tag == 2){
                        NSLog(@"填入的参数 2==%@--提示文字 == %@",lrInputView.inputText.text,lrInputView.tipName.text);//
                    }
                }
            }
        }
    }

    if (index == 0) {
        
        POP;
    }else{
        POP;
    }
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
